package com.cndw.kungfu.model.business;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.cndw.kungfu.dao.IBusinessDao;
import com.cndw.kungfu.domain.Notice;
import com.cndw.kungfu.event.model.BusinessNoticeHandler;

/**
 * 玩家GM后台管理接口
 * 
 * 
 * @author <a href="mailto:whz-work@163.com">汪洪州</a>
 * 
 * @since 1.0 Create on 2011-8-2
 */
@Service
public class IBusinessNoticeManager {

	@Resource
	private IBusinessDao businessDao;

	public List<Notice> loadBusinessNotices(int id) {
		return businessDao.loadBusinessNotices(id);
	}

	public boolean deleteNotice(int id) {
		boolean result = businessDao.deleteNotice(id);
		BusinessNoticeHandler.restart();
		return result;
	}

	public boolean updateNotice(Notice notice) {
		boolean result = businessDao.updateNotice(notice);
		BusinessNoticeHandler.restart();
		return result;
	}

	public boolean publishNotice(Notice notice) {
		boolean result = businessDao.publishNotice(notice);
		BusinessNoticeHandler.restart();
		return result;
	}
}
